object destruction造句
例句與造句
- More generally, they make object destruction automatic : an object controlled by a smart pointer is automatically destroyed ( scope.
- In the C + + programming language, and are a pair of language constructs that perform dynamic memory allocation, object construction and object destruction.
- An alternative to requiring explicit disposal is to tie resource management to object lifetime : resources are acquired during object creation, and released during object destruction.
- Analogously, object destruction can be broken down into two operations, in the opposite order : " finalization " and memory " deallocation ."
- In this case object destruction will occur promptly-possibly even during the variable's lifetime ( before the end of its scope ), if it is unreachable.
- It's difficult to find object destruction in a sentence. 用object destruction造句挺難的
- A natural approach is to make holding a resource be a class invariant : resources are acquired during object creation ( specifically initialization ), and released during object destruction ( specifically finalization ).
- Languages with manual management can arrange this by acquiring the resource during object initialization ( in the constructor ), and releasing during object destruction ( in the destructor ), which occurs at a precise time.
- Dangling pointers arise during object destruction, when an object that has an incoming reference is deleted or deallocated, without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory.
- A resurrected object is sometimes called a " " " or "'zombie "', but this term is used for various object states related to object destruction, with usage depending on language and author.
- One problem with this approach is the possibility of nested exception throws during object destruction which under the ISO C + + standard requires an immediate program termination-TnFOX works around this problem via preprocessing of the source to add extra support code.
- In common usage, a " destructor " is a method called deterministically on object destruction, and the archetype is C + + destructors; while a finalizer is called non-deterministically by the garbage collector, and the archetype is Java finalize methods.
- Secondly, releasing resources during object destruction means that an object must have a " finalizer " ( in deterministic memory management known as a " destructor " ) the object cannot simply be deallocated which significantly complicates and slows garbage collection.
- The fundamental issue is object destruction determination of when an object is no longer needed ( i . e . is garbage ), and arranging for its underlying storage to be returned to the free store so that it may be re-used to satisfy future memory requests.
- RAII works naturally for heap-managed resources, not only stack-managed resources, and is composable : resources held by objects in arbitrarily complicated relationships ( a complicated object graph ) are released transparently simply by object destruction ( so long as this is done properly ! ).
- This is primarily found in CLR languages such as C #, where finalization is used as a backup for disposal : when a resource is acquired, the acquiring object is queued for finalization so that the resource is released on object destruction, even if the resource is not released by manual disposal.
更多例句: 下一頁(yè)